﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wp.DAL;
using Wp.BLL;

public partial class Modules_Posts_Controls_PostDetail : System.Web.UI.UserControl
{
    public string PostTextId { get; set; }
    protected void Page_Load(object sender, EventArgs e)
    {
        PostTextId = CommonHelper.QueryString("PostTextId", "");
        if (!IsPostBack)
        {
            LoadData();
        }
    }
    void LoadData()
    {
        TblPostsEntity item = TblPostsManager.CreateInstant().SelectOneByTextId(PostTextId);
        if (item != null)
        {
            List<TblPostsEntity> ls = new List<TblPostsEntity>();
            ls.Add(item);
            rpt.DataSource = ls;
            rpt.DataBind();
        }
    }
}